www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminTemplates_qiye\D_chk_add_template.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>




<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->





<%
AJAXshowLoader()


%>

<%


if find_dataw("qitashezhi123","0",6)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if

%>
<%

set a=new DosAsp 


if trim(request("mbnm"))<>"" then


if trim(request("fnm"))="" then



%>






<script language=javascript>
alert("请输入 需要新建的模板文件夹的路径");



history.go(-1);

</script>


<%



else





'以下用来 支持 无限级 创建目录
call createfile("../../templates/"&request("fnm")&"test.asp","1111",true)



call deletefile("../../templates/"&request("fnm")&"test.asp")



if a.Md(server.mappath("../../templates/"&request("fnm")))=true then


sssp=request("fpath")
sssspq=split(sssp,"/")

ooosss=""

for iii=0 to ubound(sssspq)-2

ooosss=ooosss&sssspq(iii)&"/"



next



'=ooosss





set rs1=server.CreateObject("adodb.recordset")
       
rs1.open "select * from ND_templates_folder_reg_qiye",conn,1,3



rs1.addnew

rs1("templates_folder_path_name")=trim(request("fnm"))
rs1("templates_name")=trim(request("mbnm"))
rs1("beizhu")=trim(request("bzmb"))
rs1("is_sys_template")=false
rs1("is_default_template")=false

rs1.update




%>
<script language=javascript>
alert("添加成功");

self.location="D_moban_admin.asp";

</script>



<%

else

%>


<script language=javascript>
alert("添加失败,可能与其他文件夹重名 或 文件夹名有非法字符");



history.go(-1);

</script>








<%





end if

end if


else


%>



<script language=javascript>
alert("请输入模板名称");



history.go(-1);

</script>


<%

end if











AJAXcloseLoader()
%>